import cv2
path = './800.jpg'
img = cv2.imread(path)
img = cv2.resize(img, (400, 400))
print(img.shape)
# opencv打开的图像颜色通道是BGR
# cv2.imshow('img',img)
img[:20,:,:] = (0,0,0)
img[380:,:,:]=(0,0,0)
img[:,:20,:]=(0,0,0)
img[:,380:,:]=(0,0,0)
 # img[:20,:,:] = (255,255,255)

cv2.imshow('img',img)
cv2.waitKey(0)
cv2.destroyAllWindows()